<?php
/**
 * Project: Recipe
 * File: RecipeCategoryModel.class.php
 * Author: Xnfy520@gmail.com
 * Date: 12-5-4
 * Time: 下午3:21
 */

class RecipeCategoryModel extends RelationModel{

	protected $_validate = array(
		array('name', 'require', '食谱分类名称不能为空', 1, 'regex', 3),
		array('sort', 'number', '排序必须为数字', 1, 'regex', 3),
	);

	protected $_link = array(

		'RecipeArticle'=>array(
			'mapping_type'=>HAS_MANY,
			'mapping_name'=>'recipearticle',
			'class_name'=>'RecipeArticle',
			'foreign_key'=>'recipecategoryid',
		),

	);

}